.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
.\" Written by Jan Safranek <jsafrane@redhat.com>.
.TH CGRULESENGD  8 2009-02-18 "Linux" "libcgroup Manual"
.SH NAME
cgrulesengd \- control group rules daemon

.SH SYNOPSIS
\fBcgrulesengd\fR [options]

.SH DESCRIPTION
\fBcgrulesengd\fR is a daemon, which distributes processes to control groups. When
any process changes its effective UID or GID, \fBcgrulesengd\fR inspects the list
of rules loaded from the \fIcgrules.conf\fR file and files in \fIcgrules.d\fR
(see \fBcgrules.d\fR (5) for potential conflicts) directory
and moves the process to the appropriate control group.

The list of rules is read during the daemon startup and cached in the daemon's memory.
The daemon reloads the list of rules when it receives SIGUSR2 signal.
The daemon reloads the list of templates when it receives SIGUSR1 signal.

The daemon opens a standard unix socket to receive 'sticky' requests from \fBcgexec\fR.

.SH OPTIONS
.TP
.B \-h|\-\-help
Display help.
.TP
.B \-f <path>|\-\-logfile=<path>
Write log messages to the given log file. When '\-' is used as <path>, log messages
are written to the standard output. If '\fB\-f\fR' and '\fB\-s\fR' are used together,
the logs are sent to both destinations.

.TP
.B \-s[facility]|\-\-syslog=[facility]
Write log messages to syslog. The default facility is DAEMON. If '\fB\-f\fR'
and '\fB\-s\fR' are used together, the logs are sent to both destinations.
.TP
.B \-n|\-\-nodaemon
Don't fork the daemon, stay in the foreground.
.TP
.B \-v|\-\-verbose
Display more log messages. This option can be used three times to enable more
verbose log messages.
.TP
.B \-q|\-\-quiet
Display less log messages.
.TP
.B \-Q|\-\-nolog
Disable logging.
.TP
.B \-d|\-\-debug
Equivalent to '\-nvvvf \-', i.e. don't fork the daemon, display all log messages and
write them to the standard output.
.TP
.B \-u <user>|\-\-socket-user=<user>
.B \-g <group>|\-\-socket-group=<group>
Set the owner of cgrulesengd socket. Assumes that \fBcgexec\fR runs with proper
suid permissions so it can write to the socket when \fBcgexec\fR \-\-sticky is used.

.SH ENVIRONMENT VARIABLES
.TP
.B CGROUP_LOGLEVEL
controls verbosity of the tool. Allowed values are \fBDEBUG\fR,
\fBINFO\fR, \fBWARNING\fR or \fBERROR\fR.

.SH FILES
.TP
.B /etc/cgrules.conf
default libcgroup configuration file

.TP
.B /etc/cgrules.d
default libcgroup configuration files directory

.TP
.B /etc/cgconfig.conf
default templates file

.TP
.B /etc/cgconfig.d
default templates directory

.SH SEE ALSO
cgrules.conf (5), cgrules.d (5)
